package com.bw.mvvm_common.mvvm.network;

public
/**
 * @author Guan
 * @description:
 * @date :2021/9/8 0008 下午 6:57
 *
 */
class HttpFactory {
    private static  Httpinterface token,sign,ts,upload;
    public static Httpinterface create(HttpEnum httpEnum){
        switch (httpEnum){
            case Upload:
                if (upload==null){
                    upload=new Uploadimpl();
                }
                return upload;
            case Token:
                if (token ==null){
                    token=new Tokenimpl();
                }
                return token;
            case Sign:
                if (sign==null){
                    sign=new Signimpl();
                }
                return sign;
            default:
                if (ts==null){
                    ts=new TokenSignimpl();
                }
                return ts;
        }
    }
}
